<template>
  <!-- 全屏展示 -->
  <div class="bg-con">
    <div class="a-con">
      <div class="item-con" v-for="tenet in tenets" :style="{backgroundColor:tenet.color ,}">
        <div class="head">
          <div class="main-text">{{tenet.name}}({{tenet.english}})</div>
          <div class="sub-text">{{tenet.remark}}</div>
        </div>
        <div class="item-body" v-if="tenet.name == '相关性的'">
          
        </div>
        <div class="item-body" v-else-if="tenet.name == '可达成的'">
          
        </div>

        <div class="item-body" v-else>
          {{ title }}
        </div>
      </div>
    </div>
  </div>
</template>
  
<script setup>
import { ref } from "@vue/reactivity";
import { inject, onMounted, provide } from "vue";
import { myInjectionKey } from "../../methods/staticSymbol/keys";

let {somekeys,somekeysUpdate} = inject(myInjectionKey)
let globalData = inject("globalData")
defineProps(['title'])
let tenets = [
  {
    name: "具体的",
    english: "Specific",
    remark: "你的目标是什么？",
    color: "#F9B600",
  },
  {
    name: "可衡量的",
    english: "Measurable",
    remark: "如何知道目标完成了？",
    color: "#4AC774",
  },
  {
    name: "可达成的",
    english: "Attainable",
    remark: "如何实现这个目标？",
    color: "#487CFF",
  },
  {
    name: "相关性的",
    english: "Relevant",
    remark: "这个目标能满足你的短期和长期需求吗？",
    color: "#A456FB",
  },
  {
    name: "时间限制的",
    english: "Timely",
    remark: "目标什么时候完成？",
    color: "#F5632A",
  },
];

onMounted(()=>{
  console.log("my injection here",somekeysUpdate)
  console.log("globaldata",globalData.SystemName)
  
})




</script>
  
<style scoped lang="scss">
.bg-con {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.a-con {
  width: 98%;
  height: 60%;
  background-color: white;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.item-con {
  width: 345px;
  height: 440px;
  display: flex;
  flex-direction: column;
  margin: 10px;
  background-color: lightgray;
  .head {
    width: 100%;
    height: 95px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .main-text {
      font-size: 20px;
      font-weight: bolder;
      border-bottom: 2px solid white;
      line-height: 40px;
      padding: 0px 10px;
    }
    .sub-text {
      margin-top: 8px;
      font-size: 14px;
    }
  }
  .item-body {
    width: 100%;
    height: 345px;
    background-color: rgba($color: #ffffff, $alpha: 0.5);
  }
}
</style>